package com.android.nearshop.io.protocol.in;


import android.util.Log;

import com.android.nearshop.io.protocol.out.CatalogyList;

/*********************************************************
 * @author : zhaohua
 * @version : 2012-8-10
 * @see : 获得商家的各级行业。商家搜索时进行行业筛选。
 * @Copyright : copyrights reserved by personal 2007-2011
 **********************************************************/
public class CateListAction extends SoapAction<CatalogyList>
{ 
    
    /**
     * 商家的各级行业列表
     * @param catalogyId 类别id，
     *         如果是<=0，则查询所有的行业列表。
     */
    public CateListAction(int catalogyId)
    {
        super(ACTION_TYPE.ACTION_COMMON,"catalogyList");
        if(catalogyId > 0)
        {
            addJsonParam("catalogyId", catalogyId+"");
        }
    }
    
    @Override
    protected CatalogyList parseJson(String response) throws Exception
    {
        Log.d(getMethod(), getMethod() + "response: \n " + response);
        CatalogyList res = new CatalogyList();
        res.parseData(response);
        return res;
    }
}
